package com.atguigu.common.to.es;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class SkuEsModel {
    /**
     *       "attrs": {
     *         "type": "nested",
     *         "properties": {
     *           "attrId": {
     *             "type": "long"
     *           },
     *           "attrName": {
     *             "type": "keyword",
     *             "index": false,
     *             "doc_values": false
     *           },
     *           "attrValue": {
     *             "type": "keyword"
     *           }
     *         }
     *       }
     */
    private Long skuId;

    private Long spuId;

    private String skuTitle;

    private BigDecimal skuPrice;

    private String skuImg;

    private Long saleCount;

    // 是否还有库存
    private Boolean hasStock;

    // 热度评分
    private Long hotScore;

    private Long brandId;

    private Long catelogId;

    private String brandImg;

    private String brandName;

    // 分类名称
    private String catelogName;

    private List<Attrs> attrs;

    /**
     * 静态内部类
     */
    @Data
    public static class Attrs {
        private Long attrId;
        private String attrName;
        private String attrValue;
    }

}
